

#include "mySet.h"

void testSet01()
{
	what::set<int> s;
	int arr1[] = { 16, 3, 7, 11, 9, 26, 18, 14, 15 };
	int arr2[] = { 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	int arr3[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 16, 3, 7, 11, 9, 26, 18, 14, 15, 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	for (auto& e : arr3)
	{
		s.Insert(e);
	}

	what::set<int>::iterator it = s.begin();
	while (it != s.end())
	{
		std::cout << *it << ' ';
		++it;
	}
	std::cout << std::endl;

	for (auto& e : s)
	{
		std::cout << e << ' ';
	}
	std::cout << std::endl;
}